<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<style type="text/css">
		body {
			height: 5000px;
		}
		
		a {
			text-decoration: none;
			color: black;
		}
		
		#d1 {
			height: 200px;
		}
		
		#d2 {
			position: absolute;
			width: 1000px;
		}
	</style>
	<script src="../js/jQuery-1.8.3.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function() {
			var h = $("a").offset().top;
			$(window).scroll(function() {
				var shou = $(this).scrollTop();
				if(shou >= h) {
					$("a").css({
						"position": "fixed",
						"top": 0
					});
				} else {
					$("a").css("position", "static");
				}
			});
		});
	</script>

	<body>
		<div id="d1">
			<h1>图片展示区</h1>
		</div>
		<div>
			<a href="#">淘宝搜索<input type="text" name="shousuo"/></a>
		</div>
	</body>

</html>